<template>
  <div>
    <span>我是子组件</span>
    <!-- <ul>
      <li>我的名字是{{message.uname}}</li>
      <li>我的姓是{{message.famliyName}}</li>
      <li>我的年龄是{{message.age}}</li>
      <li>我的职业是{{message.profess}}</li>
    </ul> -->

    <ul>
      <li>我的名字是{{ uname }}</li>
      <li>我的姓是{{ famliyName }}</li>
      <li>我的年龄是{{ age }}</li>
      <li>我的职业是{{ profess }}</li>
      <button @click="add">年龄加一</button>
    </ul>
    <br />
  </div>
</template>
 
<script>
export default {
  name: "SonComponent",

  // props: ['message'],
  props: ["uname", "age", "famliyName", "profess",'id'],
  data() {
    return {};
  },
  computed: {},
  watch: {},
  created() {},
  methods: {
    add(){
      this.$emit('add',this.id,1)
    }
  },
};
</script>

<style scoped>
</style>